<div class="menuadd">
	<form action="<?php echo url('menu/add');?>" method="post" id="addForm">
		<table>
			<tr>
				<td align="right" width="80">菜单名称:</td>
				<td align="left" class="magin">
					<input type="text" class="required" name="menu[title]" value="" />
					<span style="color:red; margin-left: 6px;">*</span>
				</td>
			</tr>
			<tr>
				<td align="right">上级菜单:</td>
				<td align="left" class="magin">
					<?php echo fetch('menuSelect',array('show'=>1));?>	
				</td>
			</tr>
			<tr>
				<td align="right">菜单类型:</td>
				<td align="left" class="magin">
					<?php echo fetch('menuSource');?>
				</td>
			</tr>
			<tr>
				<td align="right">排序:</td>
				<td align="left" class="magin">
					<input type="text" name="menu[sortID]" />	
				</td>
			</tr>
			<tr><td colspan="2" align="right"><input type="submit" value="添加" id="catesub" /></td></tr>
		</table>
	</form>
</div>
<script type="text/javascript">
$(document).ready(function(){
	submitForm("#addForm",{
		dataType:'json',
		success:function(data){
				if(data.i=='ok'){
					location.href="<?php echo url('menu/index');?>";
				}else{
					alert(data.i);
				}
			},
	});
});
</script>
